package com.linewell.mongodemo.pojo;

import org.hibernate.validator.constraints.Length;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Field;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


public class Surface implements Serializable {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 7509376097835908327L;

	/**
	 * 唯一标识
	 */
	@Id
	private String id;
	/**
	 * 字段名（注释）
	 */
	@NotNull
	@Length(min=0,max=100)
	@Field("t_name")
	private String tName;
	/**
	 * 字段英文名
	 */
	@NotNull
	@Length(min=0,max=100)
	@Field("t_value")
	private String tValue;
	/**
	 * 字段类型
	 */
	@NotNull
	@Length(min=0,max=20)
	@Field("t_type")
	private String tType;
	/**
	 * 字段长度
	 */
	@NotNull
	@Min(0) 
	@Max(5000) 
	@Field("t_length")
	private Integer tLength;


	/**
	 * 字段固值
	 */
	@NotNull
	@Length(min=0,max=1000)
	@Field("t_guzhi")
	private String tGuzhi;
	/**
	 * 是否必填（0：否，1：是）
	 */
	@NotNull
	@Length(min=0,max=2)
	@Field("t_required")
	private String tRequired;
	
	/**
	 * 是否显示（0：否，1：是）
	 */
	@NotNull
	@Length(min=0,max=2)
	@Field("t_display")
	private String tDisplay;
	/**
	 * 排序
	 */
	@NotNull
	@Length(min=0,max=2)
	@Field("t_sort")
	private String tSort;
	/**
	 * 选项内容
	 */
	@NotNull
	@Length(min=0,max=1000)
	@Field("t_content")
	private String tContent;
	/**
	 * 字段对应元数据
	 */
	@NotNull
	@Length(min=0,max=1000)
	@Field("t_meta")
	private String tMeta;
	/**
	 * 排序
	 */
	@NotNull
	@Min(0) 
	@Max(100000) 
	@Field("sortno")
	private Integer sortno;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String gettName() {
		return tName;
	}

	public void settName(String tName) {
		this.tName = tName;
	}

	public String gettValue() {
		return tValue;
	}

	public void settValue(String tValue) {
		this.tValue = tValue;
	}

	public String gettType() {
		return tType;
	}

	public void settType(String tType) {
		this.tType = tType;
	}
	public String gettGuzhi() {
		return tGuzhi;
	}

	public void settGuzhi(String tGuzhi) {
		this.tGuzhi = tGuzhi;
	}

	public String gettRequired() {
		return tRequired;
	}

	public void settRequired(String tRequired) {
		this.tRequired = tRequired;
	}

	public String gettMeta() {
		return tMeta;
	}

	public void settMeta(String tMeta) {
		this.tMeta = tMeta;
	}

	public int getSortno() {
		return sortno;
	}

	public void setSortno(Integer sortno) {
		this.sortno = sortno;
	}
	public int gettLength() {
		return tLength;
	}

	public void settLength(Integer tLength) {
		this.tLength = tLength;
	}

	public String gettDisplay() {
		return tDisplay;
	}

	public void settDisplay(String tDisplay) {
		this.tDisplay = tDisplay;
	}

	public String gettSort() {
		return tSort;
	}

	public void settSort(String tSort) {
		this.tSort = tSort;
	}

	public String gettContent() {
		return tContent;
	}

	public void settContent(String tContent) {
		this.tContent = tContent;
	}
	
}
